#include <stdio.h>

static int num_rows, num_cols, side_length, which_line;
static char line[5010];

/* Returns 0 if impossible, 1 if unique, 2 if ambiguous. */
int solve()
{
    int i;
    
    /* Find the beginning of ***. */
    for (i = 0; line[i] == '.'; i++);

    if (line[i] == '*') /* found *** */
    {
        int begin = i, end;
        for (; line[i] == '*'; i++);
        end = i;

        /* No more * can appear. */
        for (; line[i] == '.'; i++);
        if (line[i] == '*')
            return 0;

        /* The number of *** must match exactly the side length. */
        if (end - begin != side_length)
            return 0;

        /* Now the columns are fixed. The square will be fixed if it 
         * occupies all the rows, or if it has only one row.
         */
        if (side_length == num_rows || side_length == 1)
            return 1;

        /* If the *** is on the top row or bottom row, it's unique. */
        if (which_line == 1 || which_line == num_rows)
            return 1;

        /* Now we can move the square up or down by one row, so ambiguous. */
        return 2;
    }
    else
    {
        /* The k-th row contains no ***; check above and below. */
        int above = which_line - 1, below = num_rows - which_line;
        if (above < side_length && below < side_length) /* not enough room */
            return 0;
        if (num_cols > side_length)                     /* col ambiguous */
            return 2;
        if (above > side_length || below > side_length) /* row ambiguous */
            return 2;
        if (above == side_length && below == side_length) /* above or below */
            return 2;
        return 1;
    }
}

int main()
{
    while (scanf("%d %d %d %d %s", 
        &num_rows, &num_cols, &side_length, &which_line, line) == 5)
    {
        int ret = solve();
        printf("%s\n", (ret == 1)? "Unique" : 
                       (ret == 2)? "Ambiguous" : "Impossible");
    }
    return 0;
}
